def create_Rect_MainRF
      model = Sketchup.active_model
      prompts = ["长度", "宽度", "高度","主筋数量","主筋直径",
        "保护层","箍筋直径"]
  		defaults = ["750", "700", "4500","28","25","25","10"]
  		input = UI.inputbox(prompts, defaults, "创建矩形柱")
      group = model.active_entities.add_group
		  entities = group.entities
			points = [
				Geom::Point3d.new(0,   0,   0),
				Geom::Point3d.new(input[0].to_f.mm, 0,   0),
				Geom::Point3d.new(input[0].to_f.mm, input[1].to_f.mm, 0),
				Geom::Point3d.new(0,   input[1].to_f.mm, 0)
			]
			face = entities.add_face(points)
			face.reverse! unless face.normal.samedirection? Z_AXIS
		  face.pushpull(input[2].to_f.mm)
      sideNum = input[3].to_i/4+1
      #UI.messagebox sideNum
      xInterval = (input[0].to_i-input[4].to_i-input[5].to_i*2-input[6].to_i*2)
        #UI.messagebox xInterval
      yInterval = (input[1].to_i-input[4].to_i-input[5].to_i*2-input[6].to_i*2)
      def drawMainRF(x,y,z,input,model)
        #UI.messagebox x
        centerpoint = Geom::Point3d.new(x.to_f.mm,y.to_f.mm,z.to_f.mm)
        vector = Geom::Vector3d.new 0,0,1
        group = model.active_entities.add_group
        entities = group.entities
        edges = entities.add_circle( centerpoint, vector, input[4].to_f.mm/2 )
        face = entities.add_face(edges)
        face.reverse! unless face.normal.samedirection? Z_AXIS
  		  face.pushpull(input[2].to_f.mm)
      end
      x1 = y1 = input[5].to_i+input[6].to_i+input[4].to_i/2
      xn = input[0].to_i-x1
      yn = input[1].to_i-y1

      $num = sideNum
      $i = 0
      while $i < $num do
        if $i % 2 == 0
          drawMainRF(x1+xInterval*$i/(sideNum-1),y1,0+1000,input,model)
        else
          drawMainRF(x1+xInterval*$i/(sideNum-1),y1,0+2000,input,model)
        end
         $i +=1
      end
      $i = 0
      while $i < $num do
        if $i % 2 == 0
          drawMainRF(x1,y1+yInterval*$i/(sideNum-1),0+1000,input,model)
        else
          drawMainRF(x1,y1+yInterval*$i/(sideNum-1),0+2000,input,model)
        end
         $i +=1
      end
      $i = 0    #这里还有两个问题，$i要从1开始计；单双数筋的起步高度不同
      while $i < $num do
        if $i % 2 == 0
          drawMainRF(x1+xInterval*$i/(sideNum-1),yn,0+2000,input,model)
        else
          drawMainRF(x1+xInterval*$i/(sideNum-1),yn,0+1000,input,model)
        end
         $i +=1
      end
      $i = 0
      while $i < $num do
        if $i % 2 == 0
          drawMainRF(xn,y1+yInterval*$i/(sideNum-1),0+2000,input,model)
        else
          drawMainRF(xn,y1+yInterval*$i/(sideNum-1),0+1000,input,model)
        end
         $i +=1
      end
end


                                    # 在SktchUp中显示该工具条
